;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.6.0 #4309 (Jul 28 2006)
; This file generated Fri Nov  9 19:01:31 2012
;--------------------------------------------------------
	.module errCheck
	.optsdcc -mmcs51 --model-large
	
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl _stringtoUpper
	.globl _validHexInput
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
	.area RSEG    (DATA)
;--------------------------------------------------------
; special function bits
;--------------------------------------------------------
	.area RSEG    (DATA)
;--------------------------------------------------------
; overlayable register banks
;--------------------------------------------------------
	.area REG_BANK_0	(REL,OVR,DATA)
	.ds 8
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
	.area DSEG    (DATA)
_stringtoUpper_sloc0_1_0:
	.ds 1
;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
	.area OSEG    (OVR,DATA)
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
	.area ISEG    (DATA)
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
	.area BSEG    (BIT)
;--------------------------------------------------------
; paged external ram data
;--------------------------------------------------------
	.area PSEG    (PAG,XDATA)
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
	.area XSEG    (XDATA)
_validHexInput_val_1_1:
	.ds 3
_validHexInput_ret_1_1:
	.ds 2
_stringtoUpper_val_1_1:
	.ds 3
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
	.area XISEG   (XDATA)
	.area HOME    (CODE)
	.area GSINIT0 (CODE)
	.area GSINIT1 (CODE)
	.area GSINIT2 (CODE)
	.area GSINIT3 (CODE)
	.area GSINIT4 (CODE)
	.area GSINIT5 (CODE)
	.area GSINIT  (CODE)
	.area GSFINAL (CODE)
	.area CSEG    (CODE)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area HOME    (CODE)
	.area GSINIT  (CODE)
	.area GSFINAL (CODE)
	.area GSINIT  (CODE)
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area HOME    (CODE)
	.area CSEG    (CODE)
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area CSEG    (CODE)
;------------------------------------------------------------
;Allocation info for local variables in function 'validHexInput'
;------------------------------------------------------------
;val                       Allocated with name '_validHexInput_val_1_1'
;i                         Allocated with name '_validHexInput_i_1_1'
;ret                       Allocated with name '_validHexInput_ret_1_1'
;------------------------------------------------------------
;	errCheck.c:4: int validHexInput(char * val)
;	-----------------------------------------
;	 function validHexInput
;	-----------------------------------------
_validHexInput:
	ar2 = 0x02
	ar3 = 0x03
	ar4 = 0x04
	ar5 = 0x05
	ar6 = 0x06
	ar7 = 0x07
	ar0 = 0x00
	ar1 = 0x01
;	genReceive
	mov	r2,b
	mov	r3,dph
	mov	a,dpl
	mov	dptr,#_validHexInput_val_1_1
	movx	@dptr,a
	inc	dptr
	mov	a,r3
	movx	@dptr,a
	inc	dptr
	mov	a,r2
	movx	@dptr,a
;	errCheck.c:8: ret=0;
;	genAssign
	mov	dptr,#_validHexInput_ret_1_1
	clr	a
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
;	errCheck.c:10: for(i=0;i<strlen(val);i++)
;	genAssign
	mov	dptr,#_validHexInput_val_1_1
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
	mov	r3,a
	inc	dptr
	movx	a,@dptr
	mov	r4,a
;	genAssign
	mov	r5,#0x00
	mov	r6,#0x00
00104$:
;	genAssign
	mov	dptr,#_validHexInput_val_1_1
	movx	a,@dptr
	mov	r7,a
	inc	dptr
	movx	a,@dptr
	mov	r0,a
	inc	dptr
	movx	a,@dptr
	mov	r1,a
;	genCall
	mov	dpl,r7
	mov	dph,r0
	mov	b,r1
	push	ar2
	push	ar3
	push	ar4
	push	ar5
	push	ar6
	lcall	_strlen
	mov	r7,dpl
	mov	r0,dph
	pop	ar6
	pop	ar5
	pop	ar4
	pop	ar3
	pop	ar2
;	genCmpLt
;	genCmp
	clr	c
	mov	a,r5
	subb	a,r7
	mov	a,r6
	xrl	a,#0x80
	mov	b,r0
	xrl	b,#0x80
	subb	a,b
;	genIfxJump
;	Peephole 108.a	removed ljmp by inverse jump logic
	jnc	00107$
;	Peephole 300	removed redundant label 00113$
;	errCheck.c:12: if(isxdigit(val[i])!=0){
;	genPlus
;	Peephole 236.g	used r5 instead of ar5
	mov	a,r5
;	Peephole 236.a	used r2 instead of ar2
	add	a,r2
	mov	r7,a
;	Peephole 236.g	used r6 instead of ar6
	mov	a,r6
;	Peephole 236.b	used r3 instead of ar3
	addc	a,r3
	mov	r0,a
	mov	ar1,r4
;	genPointerGet
;	genGenPointerGet
	mov	dpl,r7
	mov	dph,r0
	mov	b,r1
	lcall	__gptrget
;	genCall
	mov	r7,a
;	Peephole 244.c	loading dpl from a instead of r7
	mov	dpl,a
	push	ar2
	push	ar3
	push	ar4
	push	ar5
	push	ar6
	lcall	_isxdigit
	mov	r7,dpl
	pop	ar6
	pop	ar5
	pop	ar4
	pop	ar3
	pop	ar2
;	genCmpEq
;	gencjneshort
	cjne	r7,#0x00,00114$
;	Peephole 112.b	changed ljmp to sjmp
	sjmp	00102$
00114$:
;	errCheck.c:13: ret=1;
;	genAssign
	mov	dptr,#_validHexInput_ret_1_1
	mov	a,#0x01
	movx	@dptr,a
	clr	a
	inc	dptr
	movx	@dptr,a
;	Peephole 112.b	changed ljmp to sjmp
	sjmp	00106$
00102$:
;	errCheck.c:16: ret=0;
;	genAssign
	mov	dptr,#_validHexInput_ret_1_1
	clr	a
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
;	errCheck.c:17: break;
;	Peephole 112.b	changed ljmp to sjmp
	sjmp	00107$
00106$:
;	errCheck.c:10: for(i=0;i<strlen(val);i++)
;	genPlus
;     genPlusIncr
	inc	r5
	cjne	r5,#0x00,00115$
	inc	r6
00115$:
	ljmp	00104$
00107$:
;	errCheck.c:20: return ret;
;	genAssign
	mov	dptr,#_validHexInput_ret_1_1
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
;	genRet
;	Peephole 234.b	loading dph directly from a(ccumulator), r3 not set
	mov	dpl,r2
	mov	dph,a
;	Peephole 300	removed redundant label 00108$
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'stringtoUpper'
;------------------------------------------------------------
;sloc0                     Allocated with name '_stringtoUpper_sloc0_1_0'
;val                       Allocated with name '_stringtoUpper_val_1_1'
;act                       Allocated with name '_stringtoUpper_act_1_1'
;i                         Allocated with name '_stringtoUpper_i_1_1'
;------------------------------------------------------------
;	errCheck.c:26: void stringtoUpper(char * val){
;	-----------------------------------------
;	 function stringtoUpper
;	-----------------------------------------
_stringtoUpper:
;	genReceive
	mov	r2,b
	mov	r3,dph
	mov	a,dpl
	mov	dptr,#_stringtoUpper_val_1_1
	movx	@dptr,a
	inc	dptr
	mov	a,r3
	movx	@dptr,a
	inc	dptr
	mov	a,r2
	movx	@dptr,a
;	errCheck.c:30: act=val;
;	genAssign
	mov	dptr,#_stringtoUpper_val_1_1
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
	mov	r3,a
	inc	dptr
	movx	a,@dptr
	mov	r4,a
;	errCheck.c:32: for(i=0;i<strlen(act);i++){
;	genAssign
	mov	r5,#0x00
	mov	r6,#0x00
00101$:
;	genCall
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	push	ar2
	push	ar3
	push	ar4
	push	ar5
	push	ar6
	lcall	_strlen
	mov	r7,dpl
	mov	r0,dph
	pop	ar6
	pop	ar5
	pop	ar4
	pop	ar3
	pop	ar2
;	genCmpLt
;	genCmp
	clr	c
	mov	a,r5
	subb	a,r7
	mov	a,r6
	xrl	a,#0x80
	mov	b,r0
	xrl	b,#0x80
	subb	a,b
;	genIfxJump
	jc	00113$
;	Peephole 251.a	replaced ljmp to ret with ret
	ret
00113$:
;	errCheck.c:33: act[i]=toupper(act[i]);
;	genPlus
;	Peephole 236.g	used r5 instead of ar5
	mov	a,r5
;	Peephole 236.a	used r2 instead of ar2
	add	a,r2
	mov	r7,a
;	Peephole 236.g	used r6 instead of ar6
	mov	a,r6
;	Peephole 236.b	used r3 instead of ar3
	addc	a,r3
	mov	r0,a
	mov	ar1,r4
;	genIpush
	push	ar2
	push	ar3
	push	ar4
;	genPointerGet
;	genGenPointerGet
	mov	dpl,r7
	mov	dph,r0
	mov	b,r1
	lcall	__gptrget
;	genCall
	mov	r2,a
;	Peephole 244.c	loading dpl from a instead of r2
	mov	dpl,a
	push	ar2
	push	ar3
	push	ar4
	push	ar5
	push	ar6
	push	ar7
	push	ar0
	push	ar1
	lcall	_islower
	mov	a,dpl
	pop	ar1
	pop	ar0
	pop	ar7
	pop	ar6
	pop	ar5
	pop	ar4
	pop	ar3
	pop	ar2
;	genIpop
	pop	ar4
	pop	ar3
	pop	ar2
;	genIfx
;	genIfxJump
;	Peephole 108.c	removed ljmp by inverse jump logic
	jz	00107$
;	Peephole 300	removed redundant label 00114$
;	genIpush
	push	ar2
	push	ar3
	push	ar4
;	genPointerGet
;	genGenPointerGet
	mov	dpl,r7
	mov	dph,r0
	mov	b,r1
	lcall	__gptrget
	mov	r2,a
;	genAnd
	mov	a,#0xDF
	anl	a,r2
	mov	_stringtoUpper_sloc0_1_0,a
;	genIpop
	pop	ar4
	pop	ar3
	pop	ar2
;	Peephole 112.b	changed ljmp to sjmp
	sjmp	00108$
00107$:
;	genPointerGet
;	genGenPointerGet
	mov	dpl,r7
	mov	dph,r0
	mov	b,r1
	lcall	__gptrget
	mov	_stringtoUpper_sloc0_1_0,a
00108$:
;	genPointerSet
;	genGenPointerSet
	mov	dpl,r7
	mov	dph,r0
	mov	b,r1
	mov	a,_stringtoUpper_sloc0_1_0
	lcall	__gptrput
;	errCheck.c:32: for(i=0;i<strlen(act);i++){
;	genPlus
;     genPlusIncr
	inc	r5
	cjne	r5,#0x00,00115$
	inc	r6
00115$:
	ljmp	00101$
;	Peephole 259.b	removed redundant label 00105$ and ret
;
	.area CSEG    (CODE)
	.area CONST   (CODE)
	.area XINIT   (CODE)
